cc.Class({
    extends: cc.Component,

    properties: {
        contentLabel: {default: null, displayName: "内容", type: cc.Label},
        _okCB: null,
        _closeCB: null,
    },

    onLoad: function () {

    },
    setString(str){
        this.contentLabel.string = str.toString();
    },
    setOkCallBack(okCb){
        this._okCB = okCb;
    },
    setCloseCallBack(closeCB){
        this._closeCB = closeCB;
    },
    onClickOK(){
        if (this._okCB) {
            this._okCB();
        }
        this.node.destroy();
    },
    onClickClose(){
        if (this._closeCB) {
            this._closeCB();
        }
        this.node.destroy();
    }
});
